<template>
  <div>
    <DetailPage v-bind="defineConfig" :model="nowRowData"></DetailPage>
    表格
    <PreviewTable :data="metadataJson" :is-read="true"></PreviewTable>
  </div>
</template>

<script setup lang="ts">
import { ref, reactive, toRefs, onMounted} from 'vue'
import PreviewTable from '@/views/governmentAffairs/overallTask/previewTable/index.vue'
import DetailPage from '@/views/aplid/DetailPage/index.vue'
let props = defineProps({
    nowRowData:{
        type:Object,
        default:()=>({})
    }
})
let metadataJson = {
    data:[],
    head:{}
}
if(props.nowRowData.metadataJson){
    metadataJson = JSON.parse(props.nowRowData.metadataJson)
}

let defineConfig = {
  label: '基础信息',
	prop: 'base0',
	inline: false,
	showBtn: false,
	labelPosition: 'left',
  labelWidth:"200px",
	column:[
	{
		label: '总任务名称',
		type: 'input',
		prop: 'taskName',
		span: 8,
	},
    {
		label: '总任务发布人',
		type: 'input',
		prop: 'administrationPidName',
		span: 8,
	},
   
	{
		label: '描述',
		type: 'input',
		prop: 'taskIntro',
		span: 8,
	},
	{
		label: '结束时间',
		type: 'date',
		format: 'YYYY年MM月DD',
		valueFormat: 'YYYY-MM-DD',
		prop: 'endTime',
		span: 8,
	},
	{
		label: '紧急程度',
		type: 'select',
		defaultValue: '0',
		prop: 'emergencyDegree',
		propName: 'emergencyDegreeLabel',
		dicData: [
			{ label: '普通', value: '0' },
			{ label: '紧急', value: '1' },
		],
		span: 8,
	},
    {
		label: '任务状态',
		type: 'remoteSelect',
		prop: 'taskStatus',
        propName:"taskStatusLabel",
        code:"GOVERNMENT_MAIN_STATUS",
        api:"getDictItemList",
		span: 8,
	},
	{
		label: '备注',
		type: 'textarea',
		prop: 'remark',
		span: 24,
	},
	{
		label: '附件',
		type: 'upload',
		prop: 'taskAttachment',
		span: 24,
	},
]
}

</script>
<style scoped lang="scss">
</style>